---
title: 'Asana'
sidebarTitle: 'Asana'
description: 'Access the Asana API in 2 minutes 💨'
---
import { StatusWidget } from "/snippets/api-down-watch/status-widget.jsx"

<StatusWidget service="asana" />
<Tabs>
  <Tab title="🚀 Quickstart">
    <Steps>
      <Step title="Create an integration">
        In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> _Configure New Integration_ -> _Asana_. Nango doesn't provide a test OAuth app for Asana yet. You'll need to set up your own by following these [instructions](#🧑%E2%80%8D💻-oauth-app-setup). After that, make sure to add the OAuth client ID, secret, and scopes in the integration settings in Nango.
      </Step>
      <Step title="Authorize Asana">
        Go to [Connections](https://app.nango.dev/dev/connections) -> _Add Test Connection_ -> _Authorize_, then log in to Asana. Later, you'll let your users do the same directly from your app.
      </Step>
      <Step title="Call the Asana API">
        Let's make your first request to the Asana API (fetch a list of workspaces). Replace the placeholders below with your [secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):
        <Tabs>
            <Tab title="cURL">

                ```bash
                curl "https://api.nango.dev/proxy/api/1.0/workspaces" \
                  -H "Authorization: Bearer <NANGO-SECRET-KEY>" \
                  -H "Provider-Config-Key: <INTEGRATION-ID>" \
                  -H "Connection-Id: <CONNECTION-ID>"
                ```

            </Tab>

            <Tab title="Node">

            Install Nango's backend SDK with `npm i @nangohq/node`. Then run:

            ```typescript
            import { Nango } from '@nangohq/node';

            const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });

            const res = await nango.get({
                endpoint: '/api/1.0/workspaces',
                providerConfigKey: '<INTEGRATION-ID>',
                connectionId: '<CONNECTION-ID>'
            });

            console.log(res.data.data);
            ```
            </Tab>


        </Tabs>

        Or fetch credentials dynamically via the [Node SDK](/reference/sdks/node#get-a-connection-with-credentials) or [API](/reference/api/connection/get).

      </Step>
    </Steps>

    ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.

    <Tip>
    Next step: [Embed the auth flow](/getting-started/quickstart/embed-in-your-app) in your app to let your users connect their Asana accounts.
    </Tip>
  </Tab>
  <Tab title="🧑‍💻 OAuth app setup">
   <Steps>
  <Step title="Create an account">
    If you don't already have one, sign up for a free trial [Asana account](https://asana.com/create-account). 
  </Step>
   <Step title="Create & configure an Asana app">
     1. Navigate to [My apps](https://app.asana.com/0/my-apps).
     2. Click the **Create new app** button.
     3. Fill in all the required information and click **Create app**.
     4. You will be redirected to your app's settings. Navigate to the **OAuth** tab and click **+ Add redirect URL**. Add `https://api.nango.dev/oauth/callback` as your redirect URL.
     5. Under the **Permission scopes** section, select the various scopes you will need.
   </Step>
   <Step title="Change the distribution">
    1. Navigate to the **Manage distribution** tab and select **Any workspace**.
    </Step>
    <Step title="Obtain OAuth credentials">
    1. Under the same **OAuth** tab, copy your **Client ID** and **Client secret** as you will need them when configuring your integration in Nango.
    </Step>
  <Step title="Next">
    Follow the [_Quickstart_](/getting-started/quickstart).
  </Step>
</Steps>
  ## Common Scopes
  | Scope                | Description                                         |
  | -------------------- | --------------------------------------------------- |
  | `openid`           | Enables OpenID Connect authentication and ID tokens |
  | `profile`          | Access to user’s basic profile information          |
  | `email`            | Access to the user’s email address                  |
  | `users:read`      | Read user details and lists of users                |
  | `workspaces:read` | Read information about workspaces                   |
  | `projects:read`   | Read project details and lists of projects          |
  | `tasks:read`      | Read task details, subtasks, and dependencies       |
  | `tasks:write`     | Create, update, and manage tasks                    |

  </Tab>
  <Tab title="🔗 Useful links">
    | Topic | Links |
    | - | - |
    | General | [Website](https://asana.com/) |
    | | [Create a free trial account](https://asana.com/create-account) |
    | Developer | [API documentation](https://developers.asana.com/reference/rest-api-reference) |
    | | [Developer Console](https://app.asana.com/0/my-apps) |
    | | [Authorization documentation](https://developers.asana.com/docs/oauth) |
    | | [How to register an OAuth app](https://developers.asana.com/docs/oauth#register-an-application) |
    | | [List of OAuth scopes](https://developers.asana.com/docs/oauth#oauth-scopes) |
    | | [Details on rate limits](https://developers.asana.com/docs/rate-limits) |
    | | [How to publish your OAuth app](https://developers.asana.com/docs/publish-your-app) |

    <Note>Contribute useful links by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/asana.mdx)</Note>
  </Tab>
  <Tab title="🚨 API gotchas">
    - If you are getting `The required parameter client_id is missing or invalid`, you will most likely need to go to [Developer Console](https://app.asana.com/0/my-apps) -> Your app -> Manage distribution -> Change from `Specific workspaces` to `Any workspace`
    <Note>Contribute API gotchas by [editing this page](https://github.com/nangohq/nango/tree/master/docs/integrations/all/asana.mdx)</Note>
  </Tab>
</Tabs>

<Info>
    Questions? Join us in the [Slack community](https://nango.dev/slack).
</Info>
